How can I fix my back wheel's wobbling?
A warped frame will not cause wobble when the wheel is moved by hand.  A warped frame can cause wobble when riding at speeds since the wheel is not straight.  However, if the wheel has play (moves side to side without rotating) in the frame, then the hub is not properly adjusted or is damaged.  

The noise issues could be from any number places and should probably be looked at as well.  

You are correct in the lesson, but perhaps not in the reasoning.  Buying from a LBS should ensure you are purchasing a properly assembled and adjusted bicycle.  Hub adjustments (like the issue you are describing) are one of the many build steps a good shop will perform when assembling a new bicycle.  It's part of why you are paying a higher price at your LBS instead of an internet warehouse with no overhead.