Restructured to be more modular