Initial commit

Fixed demos such that they work with GPmat.