Begin refactoring to objective C