Various cleaning and speed improvements