Fixed several image unit functions, added new ones, fixed UnitObject and added helper method