Smaller changes to the code, not worth a commit to master but will be included in a later bigger update.