Converse theorems and the Selberg class