Update dependencies and various fixes