Refactor of context model and addition of filters API