pagination and minor improvements

* add pagination to fetching nodes and packages (including karma tests)
* utilize lodash (chaingin and compact) instead of manually replicating its functionality