Added states stuff and untested alarm sequence code

PLS TEST, SI