Big refactor. In the process of making edit work. Still need to refactor some firebase stuff.