Mayor cleanup and refactoring