Someone stop me from refactoring this. THough I will admit I think it needed it.