Restructures the code into several modules