Cleanup and refactoring in progress