Added ability to wake phone up periodically and do routine function
Some clean up