Add to_hash methods to models