Some bug fixed, router needs more work and tests