Code cleanup

This is a pretty big change.

I've bought down the amount of warnings from around 280 to 173. Some warnings must be suppressed as they can't be avoided easily.
File 3ee6dca0bca21a1101f5d3350cfdfc3658b3ee88.cs.php name should follow the pattern /^[a-zA-Z][a-zA-Z0-9._]*$/.