Code cleanup in manager