Cleaned up

removed the quick and dirty stuff, and made a proper structure for
future extensions