Function Definition implementation

Hi there! Here is a cleaner pull request for the implementation of Function Definition.
Please review, and sorry for the inconvenience.