(fix) Refactored for code cleanliness