Updated function definitions to remove the occurrence of anonymous functions. Fixes #9