Create mainwindow and add libraries