Add require('lodash') and fix membership type