Code improvement

Better organized.
Better upload file and delete.