Refactoring of the front part.