Make [f_ap] more powerful

It now can use [apD10] and deal with some dependent functions.
Merge pull request #158 from JasonGross/more-powerful-f-ap

Make [f_ap] more powerful