renamed files, some work on the state manager.