Remove state method in stateful.

This would help stateful object has various states for different
query.
Refactor scripts.