Tidy ups and minor performance improvements.
Merge branch 'master' of https://github.com/digitaltrails/piKam
Updated for recent changes.