'functions' added to lexer, and statement level parsing improved