Reference Count gets updated for vars and funcs

Cool Feature: We can eliminate dead code. Plus some basic semantic
checks are done.. Framework is ready.. Just need to add some more code.