some code refactoring to push complexity to private methods in controller, and reuse of position normalization code