Refactoring - better encapsulation