Created asynchronous photo upload task. Also refactored stuff.