Change constants to hashes
Merge branch 'state-improvements' into develop