First round of metadata tests and some bug fixes

Added new method to mark an object as viewed.