move some js dependencies. closes #767, #769