fix 1.000a

More polished, uniformed and commented code. Inventory and orderqueue
added.
resolved merge conflicts in trivial database
Merge branch 'lucas'