We consider an integral version of the Freudenthal construction relating Jordan algebras and exceptional algebraic groups. We show how this construction is related to higher composition laws of M. Bhargava in number theory. We propose an algorithmic approach to studying orbit spaces of groups underlying Bhargava's higher composition laws. Using this method we discover two new examples of spaces sharing similar properties, and indicate several more examples of spaces where such composition laws may be introduced.