Added a ID field and __setup__ function.
Error messages and constraints defined in the setup function.