Clean code and upgraded to Symfony2.6.x

See pull request @ orocrm/platform#164