Condensed into a single hpp&cpp file.