Final APE cleanup

This should be the last of the modifications, I think. If you have objections/changes let me know.