Major refactoring, based on the work done on Click to Play Manager.

So, I started making this restarless and adding Android support, when
CTP Manager (https://github.com/jvillalobos/CTP-Manager) became more
time-critical. I made the code a bit more generic and easy to share
among projects, so now I'm moving that code back to this project.