Add States class and tests