Fix warnings and linker errors. A lot of work until compilation...