Add definitions for element states and errors