Found better solution for imgFactory in deprecated constructors
Made more generic and formatted
Formatted
Made more generic, Warning: deprecated constructors
Generalized
Cleaned up generics. Warning: API break!