filter.c: renamed variables, removed unnecessary memmoves
filter.c: better option parsing