cleaned up some base.js