Added 'state' variable to several code injection points to allow 'get_state' calls to be removed from specifications.