Fixed file uploading with ajax, and empty string bug for file  browser
Also did some jquery clean-up