Support for all primitive data types
Converted to a templated wrapper for storing references to plotted variables. This introduces support for all primitive data types. Added example to show this and did a general refactor of function and variable names