Added compadibility for moodle 2.4.x

-Included various useability and fault fixes