Checks for dependencies, now relies on package-query, misc. bugfixes