Use a more modular structure

Pretty big, r?