Refractored way routes are added to stack, decoupled and optimized main run method in Core class.