Refactor using modern objective-c syntax

Refactor using modern objective-c syntax
Fixes #131