He was parliamentary private secretary to then Commons leader Jack Straw , before taking up a ministerial role in the government whip 's office , with responsibilities for managing Ministry of Justice legislation .