Added the gain example and fixed bug in invert example.
Made nomenclature for instances vs descriptors clearer, reworked makefiles.
More work on the gain example, started the doc