restore proper use of moodle files. Walf ahead to better customisation