Fix all compile and link errors
Add logic for construcitng the GP after adds