in new RemoveAll () optimization - use IsEmpty() not GetLength () != 0, and other minor cleanups for g++ template compate