Restructure files and add unit-testing structures.