Code cleanup. Updated example.