Config js and packages function revised