Working version of phonecat with tests.