State Manager rework

remade State Manager WIP