Created new unit tests. All over the place small stuff has been improved
during the process.