api, router and other updates and fixes