Small fix and remove abandoned code