Restructure code base for easier comprehension