Updated the data consumption monitoring task: fixed bugs, organized and cleaned up code