Added attr_with_default helper and refactored inherits to use it.