Format code; add createOsd API method.