Fixed hybrid 3x3 code

- if statement should use logical operators
- for loop indexes out of bounds
- cleaned up some spacing issues