Updating the SQL for the purge command, adding config options for
purging old users.
Remove unused imports.
Remove useless else.
This should be static access.