move some definitions into defs.h