fix #1348
fix small compile error on Linux
Add additional loging
Start of rework of class structure