Fix require.
Some code improvements.
Pin package version.