Add reference resolution for classes