Reformatted and optimized the code real quick.