Essays on the Portuguese labour market: the effects of flexibility at the margin