Add simple support for conversion to case classes (partial #5)