Rest calls are working properly now

Redesigned file structure.  May need to redo again since logic is done
in one file :( Idk why I did it that way.