well, building courthouses is a start, and cottage spamming should be considered with every city, but it sounds to me like you may simply be building to many 'improvements' in your cities.
for example, do you place forges/barracks in those coastal cities that produce tons of commerce/science but very few hammers? do you place banks/libraries in those highland cities that produce very little commerce? just because you can build an improvment, doesn't mean that you should because, as you are experiencing, it can cripple you with maintence costs.
if an improvement isn't going to play to the strength of a particular city, don't build it. in the lulls between beneficial improvments, convert those hammers to research, commerce, or culture...