Refactor of context modela and addition of filters API