Added additional test cases, descriptions, and error handling