I think you should move all the functions' implementation into the cpp file. The functions are already quite large and they're making this header unreasonably complicated.