Js refactor

Still a few Todo's but this the assets are in better shape than they were before.