Check compatibility for Moodle 2.7, some code improvements (See README file for details)