Started working on state system, so far really basic.