Restructure files. Pass all tests so far (aka naive implementation).