toplevel: misc cleanup and checksumming stub