Fixed errors in 2.5

All developer warnings and notices are now fixed and basic functionality
no 'works' in Moodle 2.5.