Cleaning up code for modular positioning.