Derive Data class

This solves #9