initialize states only when needed

This changes avoids to load all states on app initialization, allowing
to load faster!