Added the basic parts of the state manager and integrated it with option processor and pass manager.