Comments added and a couple of fixes

Condensed code on checking if find or replace are the active elements
Fix to remainder string used by function snippet, needed 1 char more