Coding style fixes and add an example file