adjusted router loader & slight refactorization