Add support for states saving
Add Configuration class and clarify interface