major restructuring by Etienne Bachmann: use modules instead of subroutine arguments, as in the 3D codes; this drastically simplifies the source code and is much easier to understand and maintain