Hey man, most guys have the same issues . . . unfortunatley when you gain weight, not all of it can be muscle, and when you lose weight not all of it can be fat.
However there are steps you can take to keep most of your gains muscle and most of your losses fat. Based on what you have described I would recommend starting with putting on some muscle.
I've recommended it before, but this books has really good nutrition advice, and the routine is pretty good also http://www.amazon.com/gp/product/159...Fencoding=UTF8
Basically it's about nutrient timing, most of your meals should consist of protein and healthy fats. You want to add fast acting carbs (ie sugar, I use gatorade powder before and frozen OJ concentrate afterwards) immediatley before and after your workout, and two meals with slower acting carbs (ie yams, oats, or quiona) in the next few hours after your workout.
Oh and a big key is drinking lots of water, and nothing else, no Pop, fruit juice, anythign like that, the exception being your pre and post workout shakes.