push header code into source files and remove more boost code