moses/mserver: reordering a few functions