made stage _generateHTML async, fixed tests
made stage _insertNodes async