Global updates

Unused methods removed.
Several  tabs replaced by spaces in "define" classes.
Some security tests added.