Tidied up the router