Reorganized

Just moved GPS to a function