Add few tests and fix computeHash