Implement bill back end unit tests, fixes #136