Added Plots and Flags.

Added Plots and Flags with interfaces properly implemented.
Fixed some problems with the database, maybe you've done that already, if so, you can ignore those changes.