Added SQL file, debugged plugin loading function to correct for folder/t...

...ype