Refactored is_allowed but commented out its use; removed custom errors