Everything is in just one level of if/elif/else now and I added a unit test for all branches.