Add a test, fix some boogs