JSHint active for node, and a refactor of getPendingMessages