- Refactor to accomodate SampleFilter
- Code slightly adapted to be edited under Eclipse.