Refactored to OO