Simplified some code, preparing for Swiftification