Merged old 1D stable branch to this master branch