Mass Indentation, syntax and formatting fix

This is the PHP part for #75.
There is also a major fail in the models fixed that was a simple
copy paste and 'used' unused Interfaces