Nit: shouldn't need this check, since remove() will no-op when size() == 0.  Also, it seems like that should never happen?