refactored the server

in order to be able to expose the consolidated data using our API