Clean up some code, add challenge mode.