Refactored to hide private members