Moved conversion of array to objects to it's own method, it will serve another purpose later