Update router to automatically resolve class dependencies in object constructors.

Signed-off-by: Se7enChat <se7enchat@zoho.com>