Add a few explanatory comments
Clean up some formatting nits
Move play function where it makes more sense