I made my shelves 16 ft by 6ft by 2ft - added another plank to each shelf to increase the width. I compensated for the slope along the garage wall by offsetting all the screw-in points in the front legs half an inch. This thing is HEAVY.
I anchored the unit to the wall by securing 2 scrap 2x4s to the studs - 1 at the 2nd set of legs and 1 at the far right legs - and screwing the unit legs into the 2x4s. This way, I didn't have to line the unit up precisely with the studs.