Rewrite filtering commands in ruby

Previously these were using ruby for the UI and python for the implementation with bash to bind it together.
Merge remote-tracking branch 'upstream/master'