Moved js to a seperate file