Made Image class way more modular and object oriented

Could not test it really yet because unit tests are really almost impossible without proper dependency injection...
Fixed in 24adffd3f66d098a3dcff255d4a7cebff13dfe26