Update 2

Update 2 : More Refractoring and seperate class file.