Continued abstraction of shop

Creates shop template and abstracted many shop features into separate
files.