Re-arrange fap.go: Move exported functions to the top.