Update requirements and fix some errors