Move controller file parsing to component level, from router class

This way, we can test router class easily