Clean up player code.

I've moved all of the player specific features into a new player module.
This helps create some cohesion throughout the code base.  It also helps
keep the rest of the app somewhat clean.  There hasn't been many
substantial changes.  Simply removed the global variables and moved
everything into modules.  There is more cleaning to do but this is a
decent start