Several changes and error fixes in manager2.py
Final fixes in new manager2.py