fix cost-centre entries as suggested by luite
use h$log for logging and comment out some tracing code
fix some assertions