Refactored utils class