WIP Implement parser and squash bugs

- returning reference to local variable from function? check
- invalidating iterators in for-loop? check
- any number of other memory-related bugs

orz