Appliy coding standard to Versioning
Code niceups in Versioning
Simplify query for getHistoryForResource in Versioning

adjust test accordingly