Implemented upward scope chain used for identifiers and wrote test5 to test it.