Re-orgnanize codes.