Is there anything i can do to make this any better? I was wondering how i would convert this to use a class.