Using Gmos Spectroscopy To Study Star Formation And Agn In The Candels Cosmos And Uds Fields