Streamline record type declarations

Instead of always requiring an explicit `type` field instead use it as the key for the former `records` key.