Changed package install behaviour + minor changes/fixes.
Fixeddiverged branch.