some cleanup made possible thanks to changes in master