Fix small bug and improve documentation.
Add tests for function plugins.