Candidate for unit testing and some additional unit tests.