Refactored SSA construction