Added a Filter class and IsolateColorFilter. Changed some loops for performance reasons.