minor javascript changes

* restructured base.js
* added missing functions to Player class