Improvements + Logic upgrades + New Image System

A few code improvements, especially in APIs.
Some better logic in places.
New image system which stores images much more efficiently on disk.