MINOR: doctrings + various improvements