Fix after rebase & clean up new code