Some initial porting from that old bloody branch