Move initialization to common.h and fix pragmas