Plot data type

Minor functional improvements + more testing.