Sort out dependency handling and all that stuff...