Pulled out client js into seperate file