Fixed up problems with examples and source code