Docs fixes

- Code cleanup as there was a lot of duplicate code in there
- Fixed tests
- Added tests for front-end feed