Made cleaner for tests and fix problems with hash