Fixed orders placing 48 more items than expected in cart. Fixed a small SQL error in a customer function.
Still need a save-order-to-database function, but everything else looks good from what I can see!