Removed duplicated tests and repaired mistakes