cleaned up router file