* Move metadata extraction into a library function * fix the string cases to throw NotImplementedError * Some python3 fixes