diff --git a/permaFoam/Allwmake b/Allwclean
similarity index 60%
rename from permaFoam/Allwmake
rename to Allwclean
index 54b98a9691625fe8d9da33cb4d882c792c072456..a72b93a4c5a8f14f177cfe9dc4d43c716f882a0d 100755
--- a/permaFoam/Allwmake
+++ b/Allwclean
@@ -1,9 +1,8 @@
 #!/bin/sh
-cd "${0%/*}" || exit                                # Run from this directory
+cd "${0%/*}" || exit                            # Run from this directory
 #------------------------------------------------------------------------------
 
-wmake $targetType library
-
-wmake
+wclean all src
+wclean all applications
 
 #------------------------------------------------------------------------------
diff --git a/Allwmake b/Allwmake
new file mode 100755
index 0000000000000000000000000000000000000000..2d77fbe1894aaebb64fa86f61bd4f89bb1633fa7
--- /dev/null
+++ b/Allwmake
@@ -0,0 +1,39 @@
+#!/bin/sh
+cd "${0%/*}" || exit                            # Run from this directory
+targetType=libso
+. "${WM_PROJECT_DIR:?}"/wmake/scripts/AllwmakeParseArguments
+
+#------------------------------------------------------------------------------
+# Build into FOAM_USER_{APPBIN,LIBBIN} unless otherwise specified with
+# -prefix or FOAM_MODULE_{APPBIN,LIBBIN} env varables
+
+moduleName="hydrology"
+
+echo "========================================"
+date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
+echo "Starting compile of $moduleName with ${WM_PROJECT_DIR##*/}"
+echo "  $WM_COMPILER $WM_COMPILER_TYPE compiler"
+echo "  ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
+echo "  prefix = ${FOAM_MODULE_PREFIX:-default (user)}"
+echo
+
+
+echo "========================================"
+echo "Compile $moduleName libraries"
+echo
+src/Allwmake $targetType $*
+
+echo "========================================"
+echo "Compile $moduleName applications"
+echo
+applications/Allwmake $targetType $*
+
+# Some summary information
+echo
+date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
+echo "========================================"
+echo "  Finished compile of $moduleName with ${WM_PROJECT_DIR##*/}"
+echo "  $WM_COMPILER $WM_COMPILER_TYPE compiler"
+echo "  ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
+echo
+#------------------------------------------------------------------------------
diff --git a/applications/Allwmake b/applications/Allwmake
new file mode 100755
index 0000000000000000000000000000000000000000..336e698413cf2bddae17f84ac88ce9f81fa52c54
--- /dev/null
+++ b/applications/Allwmake
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd "${0%/*}" || exit                            # Run from this directory
+. "${WM_PROJECT_DIR:?}"/wmake/scripts/AllwmakeParseArguments
+
+#------------------------------------------------------------------------------
+
+# wmake -all $targetType utilities
+wmake -all $targetType solvers
+
+
+#------------------------------------------------------------------------------
diff --git a/permaFoam/Make/files b/applications/solvers/permaFoam/Make/files
similarity index 100%
rename from permaFoam/Make/files
rename to applications/solvers/permaFoam/Make/files
diff --git a/test/plotFunction1/Make/options b/applications/solvers/permaFoam/Make/options
similarity index 86%
rename from test/plotFunction1/Make/options
rename to applications/solvers/permaFoam/Make/options
index a9d3e7d6e8ae3668db9dedfe3e6f312c19e747ea..112d14e94ba5251cd5ad0ece4c8df6378e2a4b07 100644
--- a/test/plotFunction1/Make/options
+++ b/applications/solvers/permaFoam/Make/options
@@ -14,5 +14,4 @@ EXE_INC = \
 
 EXE_LIBS = \
     -lfiniteVolume \
-    -lmeshTools \
-    -L$(FOAM_MODULE_LIBBIN) -lpermaFoam
+    -lmeshTools
diff --git a/permaFoam/createFields.H b/applications/solvers/permaFoam/createFields.H
similarity index 100%
rename from permaFoam/createFields.H
rename to applications/solvers/permaFoam/createFields.H
diff --git a/permaFoam/declarePicardControls.H b/applications/solvers/permaFoam/declarePicardControls.H
similarity index 100%
rename from permaFoam/declarePicardControls.H
rename to applications/solvers/permaFoam/declarePicardControls.H
diff --git a/permaFoam/permaFoam.C b/applications/solvers/permaFoam/permaFoam.C
similarity index 100%
rename from permaFoam/permaFoam.C
rename to applications/solvers/permaFoam/permaFoam.C
diff --git a/permaFoam/readPicardControls.H b/applications/solvers/permaFoam/readPicardControls.H
similarity index 100%
rename from permaFoam/readPicardControls.H
rename to applications/solvers/permaFoam/readPicardControls.H
diff --git a/permaFoam/setDeltaT.H b/applications/solvers/permaFoam/setDeltaT.H
similarity index 100%
rename from permaFoam/setDeltaT.H
rename to applications/solvers/permaFoam/setDeltaT.H
diff --git a/permaFoam/updatePicardControls.H b/applications/solvers/permaFoam/updatePicardControls.H
similarity index 100%
rename from permaFoam/updatePicardControls.H
rename to applications/solvers/permaFoam/updatePicardControls.H
diff --git a/test/plotFunction1/Make/files b/applications/test/plotFunction1/Make/files
similarity index 100%
rename from test/plotFunction1/Make/files
rename to applications/test/plotFunction1/Make/files
diff --git a/permaFoam/Make/options b/applications/test/plotFunction1/Make/options
similarity index 90%
rename from permaFoam/Make/options
rename to applications/test/plotFunction1/Make/options
index a9d3e7d6e8ae3668db9dedfe3e6f312c19e747ea..c51625f4a3277305006bd800316a0464af615e76 100644
--- a/permaFoam/Make/options
+++ b/applications/test/plotFunction1/Make/options
@@ -15,4 +15,4 @@ EXE_INC = \
 EXE_LIBS = \
     -lfiniteVolume \
     -lmeshTools \
-    -L$(FOAM_MODULE_LIBBIN) -lpermaFoam
+    -L$(FOAM_MODULE_LIBBIN) -lhydrology
diff --git a/test/plotFunction1/Test-plotFunction1.C b/applications/test/plotFunction1/Test-plotFunction1.C
similarity index 100%
rename from test/plotFunction1/Test-plotFunction1.C
rename to applications/test/plotFunction1/Test-plotFunction1.C
diff --git a/test/plotFunction1/test-filter1 b/applications/test/plotFunction1/test-filter1
similarity index 100%
rename from test/plotFunction1/test-filter1
rename to applications/test/plotFunction1/test-filter1
diff --git a/test/plotFunction1/test-filter2 b/applications/test/plotFunction1/test-filter2
similarity index 100%
rename from test/plotFunction1/test-filter2
rename to applications/test/plotFunction1/test-filter2
diff --git a/test/plotFunction1/test-mode1 b/applications/test/plotFunction1/test-mode1
similarity index 100%
rename from test/plotFunction1/test-mode1
rename to applications/test/plotFunction1/test-mode1
diff --git a/test/plotFunction1/test-mode2 b/applications/test/plotFunction1/test-mode2
similarity index 100%
rename from test/plotFunction1/test-mode2
rename to applications/test/plotFunction1/test-mode2
diff --git a/test/plotFunction1/test-seasonal1 b/applications/test/plotFunction1/test-seasonal1
similarity index 100%
rename from test/plotFunction1/test-seasonal1
rename to applications/test/plotFunction1/test-seasonal1
diff --git a/permaFoam/Allwclean b/src/Allwclean
similarity index 63%
rename from permaFoam/Allwclean
rename to src/Allwclean
index 8913cbc9059e55ee4a5905e30c7e64849baf992c..7123d0b743074d6687d90288de6a5b4b5dcd4049 100755
--- a/permaFoam/Allwclean
+++ b/src/Allwclean
@@ -1,9 +1,7 @@
 #!/bin/sh
-cd "${0%/*}" || exit                                # Run from this directory
+cd "${0%/*}" || exit                            # Run from this directory
 #------------------------------------------------------------------------------
 
-wclean library
-
-wclean
+wclean libso hydrology
 
 #------------------------------------------------------------------------------
diff --git a/src/Allwmake b/src/Allwmake
new file mode 100755
index 0000000000000000000000000000000000000000..5e4a931afb4689e5cdb79906838102d356fef702
--- /dev/null
+++ b/src/Allwmake
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd "${0%/*}" || exit                            # Run from this directory
+. "${WM_PROJECT_DIR:?}"/wmake/scripts/AllwmakeParseArguments
+#------------------------------------------------------------------------------
+
+wmake libso hydrology
+
+#------------------------------------------------------------------------------
diff --git a/permaFoam/library/Make/files b/src/hydrology/Make/files
similarity index 89%
rename from permaFoam/library/Make/files
rename to src/hydrology/Make/files
index cc2a678ed7560b441b072381bd87938d0141b2f6..638ce334b6f2090873ec909a0c5a38f56a8c9695 100644
--- a/permaFoam/library/Make/files
+++ b/src/hydrology/Make/files
@@ -11,4 +11,4 @@ functions/makePatchFunction1s.C
 functions/thawing/thawingFieldFunction.C
 functions/seasonal/makeSeasonalVariation.C
 
-LIB = $(FOAM_MODULE_LIBBIN)/libpermaFoam
+LIB = $(FOAM_MODULE_LIBBIN)/libhydrology
diff --git a/permaFoam/library/Make/options b/src/hydrology/Make/options
similarity index 100%
rename from permaFoam/library/Make/options
rename to src/hydrology/Make/options
diff --git a/permaFoam/library/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.C b/src/hydrology/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.C
similarity index 100%
rename from permaFoam/library/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.C
rename to src/hydrology/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.C
diff --git a/permaFoam/library/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.H b/src/hydrology/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.H
similarity index 100%
rename from permaFoam/library/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.H
rename to src/hydrology/derivedFvPatchFields/noRainFluxGradientFvPatchScalarField.H
diff --git a/permaFoam/library/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.C b/src/hydrology/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.C
similarity index 100%
rename from permaFoam/library/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.C
rename to src/hydrology/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.C
diff --git a/permaFoam/library/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.H b/src/hydrology/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.H
similarity index 100%
rename from permaFoam/library/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.H
rename to src/hydrology/derivedFvPatchFields/rainFluxMixedFvPatchScalarField.H
diff --git a/permaFoam/library/functions/Cosine/Cosine1.H b/src/hydrology/functions/Cosine/Cosine1.H
similarity index 100%
rename from permaFoam/library/functions/Cosine/Cosine1.H
rename to src/hydrology/functions/Cosine/Cosine1.H
diff --git a/permaFoam/library/functions/Sine/Sine1.C b/src/hydrology/functions/Sine/Sine1.C
similarity index 100%
rename from permaFoam/library/functions/Sine/Sine1.C
rename to src/hydrology/functions/Sine/Sine1.C
diff --git a/permaFoam/library/functions/Sine/Sine1.H b/src/hydrology/functions/Sine/Sine1.H
similarity index 100%
rename from permaFoam/library/functions/Sine/Sine1.H
rename to src/hydrology/functions/Sine/Sine1.H
diff --git a/permaFoam/library/functions/Sine/Sine1I.H b/src/hydrology/functions/Sine/Sine1I.H
similarity index 100%
rename from permaFoam/library/functions/Sine/Sine1I.H
rename to src/hydrology/functions/Sine/Sine1I.H
diff --git a/permaFoam/library/functions/Square/Square1.C b/src/hydrology/functions/Square/Square1.C
similarity index 100%
rename from permaFoam/library/functions/Square/Square1.C
rename to src/hydrology/functions/Square/Square1.C
diff --git a/permaFoam/library/functions/Square/Square1.H b/src/hydrology/functions/Square/Square1.H
similarity index 100%
rename from permaFoam/library/functions/Square/Square1.H
rename to src/hydrology/functions/Square/Square1.H
diff --git a/permaFoam/library/functions/makeFunction1s.C b/src/hydrology/functions/makeFunction1s.C
similarity index 100%
rename from permaFoam/library/functions/makeFunction1s.C
rename to src/hydrology/functions/makeFunction1s.C
diff --git a/permaFoam/library/functions/makePatchFunction1s.C b/src/hydrology/functions/makePatchFunction1s.C
similarity index 100%
rename from permaFoam/library/functions/makePatchFunction1s.C
rename to src/hydrology/functions/makePatchFunction1s.C
diff --git a/permaFoam/library/functions/seasonal/SeasonalVariation.C b/src/hydrology/functions/seasonal/SeasonalVariation.C
similarity index 100%
rename from permaFoam/library/functions/seasonal/SeasonalVariation.C
rename to src/hydrology/functions/seasonal/SeasonalVariation.C
diff --git a/permaFoam/library/functions/seasonal/SeasonalVariation.H b/src/hydrology/functions/seasonal/SeasonalVariation.H
similarity index 100%
rename from permaFoam/library/functions/seasonal/SeasonalVariation.H
rename to src/hydrology/functions/seasonal/SeasonalVariation.H
diff --git a/permaFoam/library/functions/seasonal/SeasonalVariationI.H b/src/hydrology/functions/seasonal/SeasonalVariationI.H
similarity index 100%
rename from permaFoam/library/functions/seasonal/SeasonalVariationI.H
rename to src/hydrology/functions/seasonal/SeasonalVariationI.H
diff --git a/permaFoam/library/functions/seasonal/makeSeasonalVariation.C b/src/hydrology/functions/seasonal/makeSeasonalVariation.C
similarity index 100%
rename from permaFoam/library/functions/seasonal/makeSeasonalVariation.C
rename to src/hydrology/functions/seasonal/makeSeasonalVariation.C
diff --git a/permaFoam/library/functions/thawing/thawingFieldFunction.C b/src/hydrology/functions/thawing/thawingFieldFunction.C
similarity index 100%
rename from permaFoam/library/functions/thawing/thawingFieldFunction.C
rename to src/hydrology/functions/thawing/thawingFieldFunction.C
diff --git a/permaFoam/library/functions/thawing/thawingFieldFunction.H b/src/hydrology/functions/thawing/thawingFieldFunction.H
similarity index 100%
rename from permaFoam/library/functions/thawing/thawingFieldFunction.H
rename to src/hydrology/functions/thawing/thawingFieldFunction.H