Removed unnecessary tests and made minor changes.