Refactored functionality into Surface class. Fixed inconsistency between planes and images.
Merged