(Fixed #34) Refactored with style changes