Modified JS

cleaned up JS code and removed unneeded features