Refactor to /lib dir.
Update package.