slight refactoring and optimization
slight refactoring and optimization

babelsberg/babelsberg-js,fniephaus/babelsberg-js,psieg/babelsberg-js,psieg/babelsberg-js,psieg/babelsberg-js,babelsberg/babelsberg-js,babelsberg/babelsberg-js,fniephaus/babelsberg-js,psieg/babelsberg-js,fniephaus/babelsberg-js,fniephaus/babelsberg-js,babelsberg/babelsberg-js