fixed GCC/clang compilation / fixed some forward declarations (nw)