Update code after refactoring a new feature and restructured code