Refactored to be compliant with moodle coding standards
Added gitignore
Refactored code to have locallib functions use frankenstyle