Added router class
Modified router (added class/method cheching)