massive refactoring so that I can start working on getting feeds from the database