Continued refactoring/organization/cleanup