Cleanups and variable renaming (unix)
Rearranged filter order (unix)
Serious code cleanups (unix)