Added checking route cost packets + some bug fixes.