Added sugar functions indexOf and isInt
Refactored a bit, restructured a bit
Added restart and restartAll functions