move router to its own file, add it to clientlib, move mem pool to client lib