Updating router and general bugfixes