Divided Main Class to several smaller classes. Part 2.