Restructed pattern for records.

Starteded implementing PSR-1