PSR2 standard fixes
Added tests and model changes