Refactored code to break apart functionality between different parts
Added another api endpoint to fetch multiple data points