More refactoring and bug fixes

Data should cycle properly when screen is off, and turn on when screen
comes on.