-speedup + less memory + fixes