Check compatibility for Moodle 2.7, some fixes and code improvements (see README file for details)