-Fixed some typos, added -lm to linked libraries