Change class attributes to protected

Make attributes protected so that they can be used in classes that extend this one.