Major redesign

Moved a lot of classes to a more logical structure. Built interfaces as
well as abstract classes, generally made it a better framework.