Removed unused variables and updated commenting

Removed unused variable and added some commenting to the settingsFilter function.