Completed Main class