Bugs fixed, code design and Symfony 2.6 tests added