Completely ported to Objective-C now