propagated some missing changes and made a few improvements