Added logging as well as refactored quite a bit of the internal system. It's now much more robust and works even when spamming the buttons. I'm sure some weird race conditions will crop up, but i'll cross that bridge...
Change log level to fatal to hide debug statements.