British MEPs scramble to shape EU laws ahead of Brexit