Refactor cli series list a bit
Switch to new way to handle sqlalchemy sessions in flask