Moved most threads to ApplicationState