Added a few more tests and fixed an off by one error I found.