Changed structure of code base

Renamed some variables and methods. Also re-ordered structure of .cs
files.