Improved OC driver code, fixed #56, fixed #53.