Bugfixes and cleanup

Fixed a bug which caused a sound to play when private messages for other
users are filtered out.

Cleaned up code to remove comments and old code paths.