Various changes and updates

This pull request from my master contains various changes and updates.