Separated layout implementation to new classes.