moved some stuff from header into cpp file.