Restructures; adds unit tests.