We affirm in part and reverse in part. We reverse the trial court's order of dismissal with prejudice insofar as it relates to the counts concerning declaratory relief and quiet title. We affirm the dismissal as to the other counts. We believe the trial court erred in resolving by a motion to dismiss the affirmative defense raised by the appellees concerning the unclean hands doctrine. While such a doctrine may be raised as an affirmative defense, its application to terminate the litigation here was premature, there being no evidentiary basis for determining the application of the doctrine or the extent of its application to this case.
ANSTEAD, LETTS and WALDEN, JJ., concur.