Update and trim dependencies