Refactor library some.