Huge cleanup of target. fixed ambiguity between target and class