initial cut at classes
Bunch of changes from before