openchangedb: coding style, checks and minor refactoring