Remove setTimeout and imrpove ui