Three essays on non-tariff measures and the gravity equation approach to trade