Separated states and commands. Added accepted commands to ites states