Miscellaneous fixes and enhancements

This pull request brings in a lot of small misc fixes and enhancements