Removed console.logs & used config for endpoints