Huge code cleanup in various "models".

I'm finally using PhpStorm again, which means I'm going to start
converting everything to soft tabs.
Removed faulty type-hint.
Lots of code style fixes. Mostly converting hard tabs to soft tabs.