#Improve the funtion registration process and the function definition, it's much easier and neater than before.