Add Code to store Processed Receipt Submission

also includes some code cleanup