Added note at the bottom of removeIdle about a possible error that could arise. Placed a safeguard for that but could be cleaner.