Added tests, removed a redundant error message