libftgl cleanup

 proper error checking, proper patch attribution