Adding unit tests. More to go.