Adding in type validation and central class definitions - needs review