Code refactoring and old file deletion