Update for derivation script.
Refactor tools directory.