Compiles on FreeBSD and Linux

Now compiles on both FreeBSD and Linux
Added jsdoc documentation
Fixed error in Makefile setup target