Removed a load of unwanted code for this sample.