Fixed some bugs
Removed get/set_metadata, just use .metadata instead