Adding ToString override for function classes