Basic sorting and filtering

This is to close #1. I think that labels filtering should be a separate task to do.