Examples now compile after refactor, need to check correctness