refactor stuff and remove some packages