Working build after code cleanup and refactoring.