Remove unwanted files & fix refactoring bug