miner: Various trivial improvements

 - minimal coding style fixes
 - use trigger* methods
miner: rename trigger* to emit*
miner: fix all warnings