Builds classes only once