Essays on firm productivity and innovation