Fix compilation with icc, several other changes
This fixes compilation with the Intel Compiler and some Intel Compiler warnings. Also contains a lot of unrelated changes. This is already based on !39 (closed) , so that MR should be merged first.
Edited by Dr. Felix Tobias Schindler