Added Class to Handle the main code.
Redoing the code...