Add more UDFs. Refactor udf code to base class for all udfs to use