use a private handler class instead of anonymous

Declares a custom inner class in Player.java, which holds a WeakReference
to the corresponding Player object. This allows the Player object to be
garbage collected. fixes #6
removed some unused variables