#152 further work on bartable and refactoring of data flow.