Operator code
Fixed syntax errors
Merged David's stuff