cleanup and doc fixes