Initial code port.