Finished implementing error handling in the constructors.