Fixing the things ive already fixed before on the moodle cookbook. Argh!