Code revision: Be more strict on -e, improve which checks