scalar: some further cleanup