Enhanced script ref example