Beginning to add error handling.