Rewrote router and moved all api calls to /api/