Made constructor scope-safe.