Removed the testing junk, made the key counter use modulo instead of using my hack
Merge branch 'cleanup-refactor'