Added unit tests for the remaining non-trivial methods in _package.js