optimized setTimeout and more spacing issues