Removed old timer stuff, refactored state code
old uncommitted changes