Renamed Editor to Program (easy with massedit :-)) in preparation for some refactoring. Added test cases