fix build.sh, remove function pointers
Merge branch 'next'