Made the code nicer.