More clean up and work to FindState()
Merge pull request #2 from uweenukr/master

More clean up and work to FindState()