Clean up js and got the upload hooked to server