Update and fix bugs. Add test pack