Changed protected fields to private fields