Essays on firm productivity and macro development