Remove and reorganize code.