Changed target type of record layout to plain class to allow serialization