Added annotations, series detection and some revised error handling