Government drafts legislation to reform justice system