Big Rework to Move to More of an OOP Design

The pieces are now expressed as classes. This will hopefully ease
development of tricky piece specific logic.