Improved the structure
Find few bugs with file uploading.