Added JS-based pagination for phrase management
Changed JS execution order, now mostly in sync w/ the frontend