Better product ordering

Cut down the code to make it easier to maintain