Some code cleanup

Use built in methods for some operations
Add to the message (in hopes of getting mark as read working)
change settings.commit to settings.apply
Remove some continue statements
Some more refactoring