Added onQuit method.
Slight changes to reflect changes in martin1keogh/Coinche.