Fixes to scope and exclusion

This patch makes the scope and exclusion settings function properly. It also removes some code that was not necessary.