Converted some functions to multimethods