Support function definitions
Add some tests