Cleaned up code for release. Moved the Redistributed License from Google into the actual sample program.