Slightly simpler while condition
Use bitarray_t* for the bool arrays rather than char*
In next_router, never do a smartlist_get outside of bounds
Don't use INLINE, mark helper functions as static