Initial commit

Contains first state machine implementation.