If I understand what you're trying to do, you don't need to edit loops, etc.
Check out this EASY way to get multiple category sections:
http://forum.x-cart.com/showthread.php?t=20262&highlight=two+category+list s
(Skip down to my post to see code for third category section.)
justme