Drop unused codes. Change code structures.