bug fixes

Update:
- Merged 2 voids to make code shorter and easier to understand.
- Added animation for loading a new photo.
- Made some bug fixes.