Fix PW to work on Linux. Minor improvements to LFTC