Doing some major refactoring..probably should create a diff branch.