Move module exports to bottom of file and change function to literal construction