Modify details to criteria function to prevent undefined variable errors

Also improves function readability.
Add tests for Alert class.
Fix some bizzare indentation
Add tests to cover every database call in MEMBER::load_extra_info()
Remove the requirement for short_open_tag in the documentation.

This has already been removed from all code.

Closes #610
Merge branch 'improved-testing'