Change project as qmake lib project. Fix some stuff.