fixes and features added
cleaned up some js