Made the code structure modular