Refactoring: replacement of position information with class Position.