Move functional tools inside define

This way we can use the tools on "both" sides. In order to do this I
implemented a simple inject function that makes it possible to merge
namespaces.