Fixed some compiler and linker errors
Reorganization of source files
Fix some warnings