Move class lookup inside defined functions

Was a mistake to attempt to perform lookup only once, that would require
all :class_name objects to be forward declared.