Removed {name}_max from enums; added input sanity checking; docs.