Split functions into new cpp file