Further refactoring of components to generalize and improve flexibility.