Merges and warning cleanup

Hi,

This request merges changes from tfoldi and graaff, and cleans up most warnings, including the removal of a function in plpl.c that wasn't used anywhere. All tests still passed.

Regards,

Dan