Database schema changes: splitting plot table into dataset and visible_p...

...lot tables + view plot

Refactoring of tools scripts
It would be neater to combine this check with the one above.