moved routes into lib added integration tests and small library to mock requests and responses