minor edit to remove result
saving data now works

mark_event now saves to state, not data
at the end of each trial, the state struct is concatenated to data
all trial variables now saved to state
minor cleanup