Refactor package install which also allow to pass custom params