fixes

immense performance fixes (+ some image.php fixes)