Fix build.sh, remove function pointers

Fixes #15, partially fixes #12