Changed state structures to be a cell array of structures (makes indexing a bit easier)