Re-commented inversion, which is only used for inputs, not outputs.
Changed case logic to if statements because it saved a few bytes.