Updates to allow the declaration of variables.
Updates to function
Updated error reporting