Changed router inner workings
Optimized stuff a tiny bit