Pull request for unit testing reasons

First commit is pretty much just so I can be lazy with unit testing.