Reconfigure Fuel algorithm

Fixed graphs bugs; fixed database upload process so nothing null is
pushed; refectored and cleaned unnecessary code.