Modular Assembly of Genes and the Evolution of New Functions