Move code/tests to individual modules