Removed obsolete code. Fixed phpStorm warnings