Refactored to remove superfluous classes