Cleanup data object functions
Use object functions for instrument object
Update examples to use new object functions