Implement caption route, add tests