Implement filter and state query url

Note for myself: I should put this in our JavaScript style guide with some brief notes on how promises are used. I should also put some information about lodash and how it can be used.

Please keep this comment for now as a reminder to me (I'll remove it later).