Use function declarations only

Added a jshint option called `latedef`. Still not sure why jshint
requires it. But it lets us use function declarations so it's good
for now.