Fixing up the safari device controller to have cleaner code