relocated eventManager,router and write router init function