rect manager refactoring