Change router object to AMD