Cleanups in the receipt function refs #10