Cleaned up the code to allow the config.
Testing code for api using supertest added