Refactor `dynamic` library