I isolated the logic which detects root folder from which all controllers are mapped. In addition I added support for detecting component folder.