updates to comments, removed redundancy, and normalized to exception return value errors