Partial mapping code.