Milestone-2 code changes + Copyright comments included

please review the code changes for milestone-2