Improved scrollToReference API