scorecards WIP - put the code inside toplevel.php into a class