Reorganize and simplify image_manager
Add img attribute to Entity
Update formatting in test framework