Small code cleanup
Add tests for proper subsample ordering
Add tests for parent samples