Fixed issue with resolution of function calls.
Added todos.