updated cula examples to use a cleaner c++ class