newline removed
First quick pass to make the project compile with Visualc++, bugfixe and rewriting of part of the code, to make it a bit more c++ and less C.