Made the code more D like.