fix 1.000a

More polished, uniformed and commented code. Inventory and orderqueue
added.