Refactored example to remove obsolete code.