Refactored parts of the new clusterId logic.

Do it enterprise way!