Move to ARC, add very basic tests, fix couple of bugs.