Did lot of corrections. Reference counting is changed. 7 test cases are failing now.