Refactoring and some information hiding