Small update to oop funtions and bug fixes to examples.