Use the appropriate weights for the various phases.
Add a testing mode with -t/--test.