Rewrote some scripts, and prepare for the `control` bin file.