Cleaning up PHP warnings and notices