new getFoo and setFoo functions; minor fixes