reworking function system to be more flexible with parameters and more in line with the command system. New Function interface created and doc'd