Fixing up minor errors, adding a working example