Refactored the visibillity of some classes