Marginal improvements to hacky run.sh script

Now it attempts to shut down the previous run with `killall`. Not nice
but will do until there is an init script to perform the same job more
gracefully.
Dissolve contest.pm into sensible modules

No real logical changes. TODO: fix up imports, many are useless.