Tidied up some logging and removed duplicate js file