Adding glue code for fetching user history
Fixing various things on the stored procedures that commit a user's order