Readded states() method that was lost in merge with constrainable branch.