Clean up, remove unneeded stuff and improve some dependencies.