Remove custom code for merge into mainstream