Added option to override baseUrl