Move listing + filtering into own function. Closes #12