Updated version

Some code rewriting, ready for Prestashop 1.6.9