Fixed some warnings and errors, fixed the cpack for creating DEB and TAR.GZ archives