add Distribution interface and tidy up docs