Clean some old code which is no longer used