Define some constants in common.h, and other tiny changes.