Cosmetic Changes

Make code more readable changed `and` to `&&`, changed single line if statements to ternary operator, etc..