Improved function definition section of parser