various minor changes and fixes