Speedup and cleanup