Genericised the router to return value rather than assume a function
0.0.2