Removed most of the duplicated code, moved some classes to utility::vision.