Mediating primary mathematics: theory, concepts, and a framework for studying practice