Significant cleanup, everything is much more encapsulated now