Small edits to lib and related.