Started making code more modular