free up memory in GetRules()
use scandir() instead of glob() for cleancache()
remove namespace backslashes