Generate state models