I am not sure if the Invoice App itself is really acceptable solution for people to use, but I inline-documented the code of the Storage-Engine to make it really clear and easy to follow how you could go about it.