Added some more PHPDoc comment blocks
Added and modified loads of comments
Deprecated mysql-specific function, and added replacement
Added comment in config-file