Moved all JS to a seperate file for simplisity