Refactoring, Updated Code Structure