Updating some unit tests and fixing a bug in the
main helper files.