Split files and added documentation
Fixed primary key for receipts table
Refactored/formatted database queries