Cleanup

Cleanup of variable syntax, and switch to egrep instead of grep for debian.