cleanup and added more tab selection for url params