Refactored. Reduced visibility of methods.