We study the effects of growth temperature, Ga:As ratio and post-growth annealing procedure on the Curie temperature, Tc, of (Ga,Mn)As layers grown by molecular beam epitaxy. We achieve the highest Tc values for growth temperatures very close to the 2D-3D phase boundary. The increase in Tc, due to the removal of interstitial Mn by post growth annealing, is counteracted by a second process which reduces Tc and which is more effective at higher annealing temperatures. Our results show that it is necessary to optimize the growth parameters and post growth annealing procedure to obtain the highest Tc.