Clean up various style issues in manager.py. Re-order some methods for clearer view as well.