refactor packages and refactor config variables