some cleanup of main
reorg fsm_policy