[Refactoring] Remove some unnecessary code