Refactored main class
Fixed whitespaces