General predict and various fixes.