Flesh out things, add some tests