removed comments, changed devise version and changed error codes