Fixed a parsing bug with functions and added mockup code generator