More improvements and fixes (nearly stable now)