Tests are a tad messy but they are done.