Tidy up

A little tidy up;

Extract out fields, and add a type.