Parser now parses functions (needs testing)