Added config function and errors.