Fixed parsing of calls and some minor bugs
(uncommitted files + test throwing wrong exception)