Some minor changes and fixes.
Merge branch 'tmp'