removeCompleted moved outside document ready and works now.