Added g++ warning flags, fixed some typos