Made a note to refactor adjust_allocations() later