updated model mehtods, got the server working again, moved server functions out into middleware and routes consolidated api middleware and helpers, api is still torn apart but model tests are passing, yay