Scheme which benefited thousands of Midlothian jobs gets set