Refactored code ver 1.1

Refactored "Main" class