Split realm into a separate file