Use GNUInstallDirs to determine most of used variables

Also removed unused vars