Removed extra alerts from javascript