Add basic challenge mode support, not completely finished.
Clean up some code, add challenge mode.
Merge pull request #3 from hexafluoride/unstable

Merging unstable version