clean-up code

fixes #91, #87
Fix failing tests
Add docblocks
Bug fix

If `DOWNLOAD_ENABLED` is not defined, return false
CS fixes
Fix explicit join bug
Conform query style to existing standards
Merge pull request #96 from texdc/160_clean_up_others_mess

clean-up work