Fixed some code issues.
Added failing unit test - waiting for parser fix.