Fix PIDFILE path, and clean up some commented code