TVDB error handling, tidy up and bugfixes