Reorganize code.