Topologically massive gauge theories