Fix bootstrap, add documentation

Fixed the resampling in the bootstrap function, so that is can select
galaxies more than once properly. Also added some documentation.