Modernization commits 

I in the end splitted the classes separately and did some other minor modernization work (mainly changing classes to PHP 5 format.