[TASK] Remove hardcoded image info and PHP 5.3 dependency in unit tests

Plus some code cosmetics. You can dump this PR if you think it's overdone.