Added debug code, removed classic delay timer, replace with a loop for eventual background tasks. Cleaned up formatting.
Broken
Removed broken delay loop, fixed off by one error.