Added feature to upload file. Removed few bugs