Integrated Sabee's changes

Integrated the changes Sabee made into what I had already. The customer
order tab doesn't do things for a unique customer but otherwise seems to
work as it should.
Merge pull request #27 from conclarke/master

Integrated Sabee's changes