ADD: Convert fsm to component

@algerhoi 
Please review