Code cleanup

- Removed double functions
- Cleanup view_image_url for easier reading