Extracted classes into library

Took a bunch of base classes and put them in a library. Got buttons
working, starting on getting event handlers up.