Reorganized 006 and cleaned up code.