added mpi support
Merge remote-tracking branch 'origin/master'
bugfixes, program encapsulation, optimizations