Made OR work with different camera modes.
Fixed poor coding standard