Add instatiation in cpp file, fix some errors in header file