Porting to Qt5 and CMak files clean up