Reorganize and remove dead code, further reducing the binary file size.