Cleanup

Took @bemurphy's branch and merged master. Also merge in the real tests branch and everything passed locally (in #32)