Cleaned up the code
Added sleep mode
small changes to sleep
changed stuff, doesn't work properly