More type checking. Removed a few record selectors.