Refactoring of Valhal