Put errors into package, added comments.