Objective-C port of Dan Palmer's Complexify