Added plotname to the database.
Various changes to make file size smaller and readability easier.