moved state machine files out of ui folder and into src and include directories