Merge pull request #308 from arielf/master

Platform differences file: platform.h to avoid #ifdef clutter (prelimina...
Merge pull request #314 from arielf/runtest

Runtest
add missing reference files
fixed compile bug in some systems
regularization fix, take III