some refactoring, bug fixes, parallel VEM