Added image factory

Added a lightweight image factory, made with the flyweight pattern.