fixing up things, adding docs