Change `proxy-target?` to schema, other misc cleanup
Reorganize core namespace

This commit doesn't contain any code changes; it simply re-orders
the functions and adds some pragmas to try to make things a bit
more organized.