revamp routing and add log viewing