Refactor for readability
Fix comment
Further fixes for broken Emacs support

Merge remote-tracking branch 'github/nominolo/master'