fixed a typedef issue
fixed some bugs with static keywords
started templating the curve.h file