clean up common
improvements to lib