Fixed js

Did some problems then fixed them with Joe