This commit adds a function that takes a set of inputs and splits them in sensible sets to be used for generating transactions.