hex manager refactoring