made everything more modular using objects and modules