Added more extra function handling.