Added tests to three steps.
Refactoring some error responses.