Final port to 1.6.2. All features working