clean up and improve adding dependencies