Checked the previous changes by ranning an actual case. Some minor declaration error are corrected in header file