Little speedups, few memory fixes;