Fix linting errors

- Remove unused logic copied from store
- Fix unit test for file listing