Implemented symbol resolving.

This is not yet tested. First we'll do the body and attribute binding and after that, unit tests will follow.