Cleaner formatting of positioning code