Automatically clear targets before freeing environments.
Add fleet manipulation functions.
Use prefixed types/enums in the public API.

This is a big commit full of uninteresting changes, sorry.
Add helper functions for better brevity in hand-written tests.
Dynamically generate a header with names defined.