Add GPL3 license and some comments.
Explain representative_element and add a basic unit test for vector output.