refactoring ,updating code to enhance structure to meet basic object-oriented standards