Updated unit tests and changed cleaning methods.