Made the code more consistent