Break sampling function into smaller functions
Break sampling into separate function
Remove junk