Recordlink sampling

Please don't commit these long commented out code blocks. It makes it harder to tell what's going on.