update dependencies - refactor some stuff