Refactoring of FRM stuff.