Well. I don't think there is a large problem with the way the code is structured now, so if you just fix the confitional I think it is ok.