cleanup docs and fns