minor perf tweaks to workdone.php