Merging abhinav code and some changes