Changed: Tidied the syntax of the following UDFs.