Split out code.