Revising api to support state creation before running better.