made two classes as cacheable objects.

reduced construction time.