More code samples and a small bug fix