added function to delete series
reorganized api controllers and fixed tests