Bugfixes and code style in XCache driver