COMP: move functions/methods out of header files