Commit with misc changes before substantial refactoring