make observeObject use core
move tests to core