Clean up code
Clean up the code, apply PSR-2, replace deprecated method calls.
[TASK] Compatibility and code cleanup
Verified compatibility with TYPO3 CMS 7, applied PSR-2,
cleaned up code, replaced old API calls.
Reviewed-by: Francois Suter <email@example.com>
Tested-by: Francois Suter <firstname.lastname@example.org>