Refactored shop

Now much cleaner, faster, and maintainable.  only a few TODOs left