Fixed the imaging problems

- General API cleanup
- Fixed the error, that if two images had the same filename
- Images can now also have the instance attached to them to make them easier to find
- Litte fixes with image retrieval
- Removed a little print that might cause output