moved functions into separate files. added gps and system status handling