Added RegisterFunctions method which takes an object and registers all compatible methods either globally or in a table