Refactor the code. It looks better now. (I think)